package nps.test.ndk;

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;

public class NDK_TileMapActivity extends Activity {
	public static GLSurfaceView m_GLSurfaceView;
	public static npRenderThread m_Thread;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        m_GLSurfaceView = new npGLSurfaceView(getApplicationContext());
        setContentView(m_GLSurfaceView);
        
        if(m_Thread == null){
        	m_Thread = new npRenderThread(getApplicationContext());
        	m_Thread.start();
        }
    }
    
    static{
    	System.loadLibrary("npsGLLib");
    }
    
    public void onStop(){
    	npNativeEvent.npDestroy();
    	m_Thread.interrupt();
    	
    	super.onStop();
    }
    
}